<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input type="text" value="1" placeholder="a">

  <input class="checkbox" type="checkbox" name="" id="" checked>
</body>
<script>
  const input = document.querySelector('input');
  const checkbox = document.querySelector('.checkbox');

  //设置表单的值
  input.value = '2';
  //设置表单的类型
  //input.type = 'password';

  checkbox.checked = false

</script> 

</html>